package com.imay.live.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2017/07/25 0025.
 */

public class TopicModel implements Parcelable {
    /**
     * content : 超胆播详细1超胆播详细1超胆播详细1超胆播详细1超胆播详细1超胆播详细1
     * id : 1
     * title : 超胆播题目1
     * authorName : 学霸
     * successNumber : 9
     * medal : 1 //展示挑战图标
     */

    private String content;
    private int id;
    private String title;
    private String authorName;
    private int successNumber;
    private int medal;
    private int defMusicId;
    private int musicUpdateTime;
    private int exampleId;
    private String musicUrl;

    protected TopicModel(Parcel in) {
        content = in.readString();
        id = in.readInt();
        title = in.readString();
        authorName = in.readString();
        successNumber = in.readInt();
        medal = in.readInt();
        defMusicId = in.readInt();
        musicUpdateTime = in.readInt();
        exampleId = in.readInt();
        musicUrl = in.readString();

    }

    public TopicModel() {

    }

    public static final Creator<TopicModel> CREATOR = new Creator<TopicModel>() {
        @Override
        public TopicModel createFromParcel(Parcel in) {
            return new TopicModel(in);
        }

        @Override
        public TopicModel[] newArray(int size) {
            return new TopicModel[size];
        }
    };

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthorName() {
        return authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    public int getSuccessNumber() {
        return successNumber;
    }

    public void setSuccessNumber(int successNumber) {
        this.successNumber = successNumber;
    }

    public int getMedal() {
        return medal;
    }

    public void setMedal(int medal) {
        this.medal = medal;
    }

    public int getDefMusicId() {
        return defMusicId;
    }

    public void setDefMusicId(int defMusicId) {
        this.defMusicId = defMusicId;
    }

    public int getMusicUpdateTime() {
        return musicUpdateTime;
    }

    public void setMusicUpdateTime(int musicUpdateTime) {
        this.musicUpdateTime = musicUpdateTime;
    }

    public int getExampleId() {
        return exampleId;
    }

    public void setExampleId(int exampleId) {
        this.exampleId = exampleId;
    }

    public String getMusicUrl() {
        return musicUrl;
    }

    public void setMusicUrl(String musicUrl) {
        this.musicUrl = musicUrl;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(content);
        dest.writeInt(id);
        dest.writeString(title);
        dest.writeString(authorName);
        dest.writeInt(successNumber);
        dest.writeInt(medal);
        dest.writeInt(defMusicId);
        dest.writeInt(musicUpdateTime);
        dest.writeInt(exampleId);
        dest.writeString(musicUrl);
    }
}
